﻿using ChongJu.ModelManager.Alarm;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Data;

namespace ChoJu.Converters.Alarm
{
    public class MessageTypeConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            var type = (ModuleEnum)value;
            switch (type)
            {
                case ModuleEnum.Camera : return "相机";
                case ModuleEnum.ImageAnalyze: return "模型解析";
                case ModuleEnum.PLC : return "PLC";
                case ModuleEnum.Printer : return "打印";
                case ModuleEnum.Weighter : return "称重";
                default: return "告警";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}